@extends('layout.adminindex')
@section('con')
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>修改商品类别</span>
    </div>
    <div class="mws-panel-body no-padding">
    	<form class="mws-form" method='post' action="/admin/cate/update" >
    			{{csrf_field()}}
    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">父类商品名称</label>
    				<div class="mws-form-item">
    					<select name="pid" id="" class='small' disabled>
    						<option value="0">顶级父类</option>
    						@foreach($list as $v)

    							<option value="{{$v['id']}}"
                                        @if($res['pid'] == $v['id'])
                                            selected
                                        @endif
                                >{{$v['name']}}</option>
    						@endforeach
    					</select>
    				</div>
    			</div>
    			<div class="mws-form-row">
    				<label class="mws-form-label" >修改的名称</label>
    				<div class="mws-form-item">
    					<input class="small" type="text" name='name' value='{{$res['name']}}'>
    				</div>
    			</div>
    			<input type="hidden" name='id' value='{{$res['id']}}'>
    		<div class="mws-button-row">
    			<input value="修改" class="btn btn-danger" type="submit">
    			<input value="重置" class="btn " type="reset">
    		</div>
    	</form>
    </div>    	
</div>
@endsection
